Crate rome_rowan

source ·
Expand description

A generic library for lossless syntax trees. See examples/s_expressions.rs for a tutorial.

Re-exports

Modules

Macros

Structs

Enums

Traits

  • The main trait to go from untyped SyntaxNode to a typed ast. The conversion itself has zero runtime cost: ast and syntax nodes have exactly the same representation: a pointer to the tree root and a pointer to the node itself.
  • List of homogenous nodes
  • List of nodes where every two nodes are separated by a token. For example, the elements of an array where every two elements are separated by a comma token. The list expects that the underlying syntax node has a slot for every node and separator even if they are missing from the source code. For example, a list for a b where the , separator is missing contains the slots Node(a), Empty, Node(b). This also applies for missing nodes: the list for , b, must have the slots Empty, Token(,), Node(b), Token(,).
  • Factory for creating syntax nodes of a particular kind.
  • Primitives with a textual length that can be passed to TextSize::of.

Functions

Type Definitions